﻿using System.Diagnostics.Contracts;
using Shape.Mvp.Views;
using Shape.Mvp;

namespace Shape
{
	public abstract class Presenter<TView> where TView : IView
	{
		private IApplicationController _applicationController;
		private TView _view;

		protected Presenter(IApplicationController applicationController, TView view)
		{
			Contract.Requires(applicationController != null);
			Contract.Requires(view != null);
			
			_applicationController = applicationController;
			_view = view;
		}

		public IApplicationController ApplicationController
		{
			get { return _applicationController; }
		}

		public TView View 
		{ 
			get { return _view; } 
		}
	}
}
